home *** CD-ROM | disk | FTP | other *** search
- Path: lrz-muenchen.de!news
- From: watzka@stat.uni-muenchen.de (Kurt Watzka)
- Newsgroups: comp.lang.c
- Subject: Re: Storing C Functions In An Array?
- Date: 4 Apr 1996 20:21:17 GMT
- Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
- Distribution: world
- Message-ID: <4k1avt$b58@sparcserver.lrz-muenchen.de>
- References: <4jc1u7$5e9@infa.central.susx.ac.uk> <4jerhn$sc8@oege.htsa.hva.nl> <4jj5d0$me8@news.xs4all.nl> <4k12qc$epc@oege.htsa.hva.nl>
- NNTP-Posting-Host: sun2.lrz-muenchen.de
-
- ferdinan@htsa.htsa.hva.nl (Ferdinand de Boevere) writes:
-
- >In article <4jj5d0$me8@news.xs4all.nl>, Falstaff <falstaff@xs4all.nl> wrote:
- >>ferdinan@htsa.htsa.hva.nl (Ferdinand de Boevere) writes:
-
- >>I remember one entry in an early Obfuscated C Programming Contest.
- >>It declared main something like this:
-
- >>int main[]=
- >>{ 5236,736,8,-547,'f',
-
- >>and it actually ran on PDPs and VAXen. So it *can* be done :-)
-
- >No, it can't be done !
- >This was probably nothing but declaring an array called main
- >inside another function (e.g. main).
-
- The trick is _not_ do declare this array inside another function, i.e.,
- you _want_ to have a symbol called "_main" with external linkage. It
- might be less than portable, though :-)
-
- Kurt
- --
- | Kurt Watzka Phone : +49-89-2180-6254
- | watzka@stat.uni-muenchen.de
-
-